#ifndef ZOM_H
#define ZOM_H

#include<QMediaPlayer>
#include<QLabel>
enum{Com_Zom};
class zom
{
public:
    //通用属性
    int number; //僵尸编号--方便吃植物时标识
    int life;
    int init_life;
    int x;
    int y;
    int fps=1;
    int dead_fps=1;
    int eat_fps=1;
    int type;
    int walk_speed=3;
    int attack=20;
    int eat_pre=0;
    int eat_fre=35;    //帧数每过eat_fre就更新一次吃的画面
    int dead_pre=0;
    int dead_fre=100;  //死亡动画帧数
    bool exist=true;
    bool reduce_speed=false;
    int reduce_speed_time=6000;//僵尸减速时间
    int reduce_speed_pre=0;     //僵尸已减速时间
    int reduce_fre=75;    //减速帧数
    bool eat_statue=false;

public:

    zom(int X,int Y,int T=Com_Zom,int L=1000);
    ~zom();
    void RenewPos();
};

#endif // ZOM_H
